Fix keyvault extension authentication to always use a user managed identity#3492
Conversation
|
/test-shared-services |
|
/help |
|
/test-shared-services |
|
🤖 pr-bot 🤖 🏃 Running shared service tests: https://github.com/microsoft/AzureTRE/actions/runs/4947240687 (with refid (in response to this comment from @tamirkamara) |
|
/test-shared-services |
|
🤖 pr-bot 🤖 🏃 Running shared service tests: https://github.com/microsoft/AzureTRE/actions/runs/4948983697 (with refid (in response to this comment from @tamirkamara) |
2 similar comments
|
🤖 pr-bot 🤖 🏃 Running shared service tests: https://github.com/microsoft/AzureTRE/actions/runs/4948983697 (with refid (in response to this comment from @tamirkamara) |
|
🤖 pr-bot 🤖 🏃 Running shared service tests: https://github.com/microsoft/AzureTRE/actions/runs/4948983697 (with refid (in response to this comment from @tamirkamara) |
|
Ok, so tested this, bundle Settings - off the VM itself: {"runtimeSettings":
[{"handlerSettings": {"publicSettings": {"secretsManagementSettings":
{"authenticationSettings": {"msiClientId": "/subscriptions/1e836626-b8c0-49a5-b4aa-9e9f93e31abf/resourceGroups/rg-mrtredemo27/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id-nexus-mrtredemo27",
"msiEndpoint": "http://169.254.169.254/metadata/identity"},
"observedCertificates": ["https://kv-mrtredemo27.vault.azure.net/secrets/nexusvmcert"], "pollingIntervalInS": "3600",
"requireInitialSync": true}}, "protectedSettings": null,
"protectedSettingsCertThumbprint": null}}]}Extension logs: The id The cloud-init logs show: Not sure why the VM would have system assigned identity enabled? |
|
/test |
|
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/5011072398 (with refid (in response to this comment from @tamirkamara) |
|
@marrobi something is off here. I don't have any system managed identity on my nexus VM, nor is there one in the environment associated with this PR. |
|
@tamirkamara if I deploy a VM through the portal, nothing set, it gets a system ID, if I look at the ARM JSON used to deploy there isn't one set. So wonder if its a default somewhere? |
|
@tamirkamara I think the JSON in terraform isn't quite right: https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/key-vault-linux#extension-schema
Might try give it a go. |
|
Ok, with that change I get a different error: |
|
The client ID was incorrect, it was |
marrobi
left a comment
There was a problem hiding this comment.
Need the change making as per comment.
|
/test-shared-services |
|
🤖 pr-bot 🤖 🏃 Running shared service tests: https://github.com/microsoft/AzureTRE/actions/runs/5033123861 (with refid (in response to this comment from @tamirkamara) |
|
/test-force-approve |
|
🤖 pr-bot 🤖 ✅ Marking tests as complete (for commit ea93b35) (in response to this comment from @tamirkamara) |

What is being addressed
The keyvault VM extension sometimes fails as it didn't have a config to always use the assigned user managed identity.
How is this addressed